//------------------------------------------------------------------------------
// <copyright file="Program.cs" company="Damian Antonowicz">
//       copyright © 2010 Damian Antonowicz
// </copyright>
// <author>Damian Antonowicz</author>
// <email>poczta@damianantonowicz.pl</email>
//------------------------------------------------------------------------------

using System;
using System.Windows.Forms;
using System.IO;

namespace Updater
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main(string[] args)
        {
            try
            {
                string workingDirPath = "";

                if (args.Length > 0 &&
                    !String.IsNullOrEmpty(args[0]) &&
                    args[0] != "" &&
                    Directory.Exists(args[0]))
                {
                    workingDirPath = args[0];

                    
                }

                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);
                Application.Run(new FormMain(workingDirPath));
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }
    }
}
